//
//  AppDelegate.m
//  WeatherApp
//
//  Created by Yuliya Grasevych on 23.07.14.
//  Copyright (c) 2014 Yuliya Grasevych. All rights reserved.
//

#import "AppDelegate.h"
#import "WAWeatherProvider.h"
#import "WALocation.h"

#import "NSView+FillWithView.h"
#import "NSObject+CastToClass.h"

@implementation AppDelegate

- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
    [self.window setMovableByWindowBackground:YES];
    self.weatherViewController = [[WAWeatherViewController alloc] initWithNibName:NSStringFromClass([WAWeatherViewController class]) bundle:nil];
    [self.weatherViewController.view setFrame:[(NSView *)self.window.contentView bounds]];
    [self.window.contentView fillWithView:self.weatherViewController.view];
//    [[WAWeatherProvider sharedInstance] addLocation:[[WALocation alloc] initWithWoeid:@"924943"]];
    [[WAWeatherProvider sharedInstance] updateAllLocations];
}


@end
